<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div class="left_col scroll-view" th:fragment="lefter">
    <div class="navbar nav_title" style="border: 0;">
        <a th:href="@{/main}" href="../main" class="site_title"><i class="fa fa-paw"></i> <span>KT CRM</span></a>
    </div>

    <div class="clearfix"></div>

    <!-- menu profile quick info -->
    <div class="profile">
        <div class="profile_pic">
            <img th:src="@{/images/img2.jpg}" src="../static/images/img2.jpg" alt="..." class="img-circle profile_img">
        </div>
        <div class="profile_info">
            <span>欢迎您,</span>
            <h2 th:text="${session.user.usrName}"></h2>
        </div>
    </div>
    <!-- /menu profile quick info -->

    <br />

    <!-- sidebar menu -->
    <div id="sidebar-menu" class="main_menu_side hidden-print main_menu">
        <div class="menu_section">
            <h3 th:text="${session.user.role.roleName}"></h3>
            <!--<ul class="nav side-menu">
                <li><a><i class="fa fa-edit"></i> 权限管理 <span class="fa fa-chevron-down"></span></a>
                    <ul class="nav child_menu">
                        <li><a th:href="@{/user/list}" href="/user/list">用户管理</a></li>
                        <li><a href="javascript:;">角色管理</a></li>
                    </ul>
                </li>
            </ul>-->
            <ul class="nav side-menu">
                <li th:if="${right1.rightType == 'Folder'}" th:each="right1:${session.user.role.rights}">
                    <a>
                        <i class="fa fa-home"></i>
                        <span th:text="${right1.rightText}">一级菜单</span>
                        <span class="fa fa-chevron-down"></span>
                    </a>
                    <ul class="nav child_menu">
                        <li th:if="${right2.rightType == 'Document' && right2.rightParentCode == right1.rightCode}"
                            th:each="right2:${session.user.role.rights}">
                            <a th:href="@{${right2.rightUrl}}" href="javascript:;" th:text="${right2.rightText}">
                                二级菜单
                            </a>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>


    </div>
    <!-- /sidebar menu -->

    <!-- /menu footer buttons -->
    <div class="sidebar-footer hidden-small">
        <a data-toggle="tooltip" data-placement="top" title="Settings">
            <span class="glyphicon glyphicon-cog" aria-hidden="true"></span>
        </a>
        <a data-toggle="tooltip" data-placement="top" title="FullScreen">
            <span class="glyphicon glyphicon-fullscreen" aria-hidden="true"></span>
        </a>
        <a data-toggle="tooltip" data-placement="top" title="Lock">
            <span class="glyphicon glyphicon-eye-close" aria-hidden="true"></span>
        </a>
        <a data-toggle="tooltip" data-placement="top" title="Logout" th:href="@{/user/logOut}" href="/manager/logOut">
            <span class="glyphicon glyphicon-off" aria-hidden="true"></span>
        </a>
    </div>
    <!-- /menu footer buttons -->
</div>
</body>
</html>